package geyue.wechat;

import com.blade.kit.base.Config;

public class Application {
	
	public static void main(String[] args) {
		try { 
			WechatRobot wechatRobot = new WechatRobot();
			//显示二维码
			wechatRobot.showQrCode();
			//判断是否登录成功
			while(!Constant.HTTP_OK.equals(wechatRobot.waitForLogin())){
				Thread.sleep(2000);
			}
			//登录成功，关闭二维码弹出框，弹出框技术用到了jrame技术
			wechatRobot.closeQrWindow();
			//对话机器人，开始工作
			wechatRobot.start();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
}